<template>
  <div>
    <p>{{ sex === 0 ? "男" : "女" }}</p>
    <button @click="btnFN">点击转换性别</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      sex: 0,
    };
  },

  created() {},

  methods: {
    btnFN() {
      if (this.sex === 0) {
        this.sex = 1;
      } else {
        this.sex = 0;
      }
    },
  },
};
</script>

<style scoped lang="less"></style>
